/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package facade;

import delta.reporting.PopularProducts;
import entity.Category;
import entity.Product;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author Kate
 */
@Local
public interface ProductFacadeLocal {

    public void create(Product entity);

    public void edit(Product entity);

    public void remove(Product entity);

    public Product find(int id);

    public List<Product> findAll();

    public List<Product> findRange(int firstResult, int maxResults);

    public List<Product> findByName(String name, int firstResult, int maxResults);

    public List<Product> findByCategory(Category category, int firstResult, int maxResults);

    public List<Product> findActive(int firstResult, int maxResults);


    public List<PopularProducts> findPopularProducts(int maxResults);

    public List<Product> findActive(int firstResult, int maxResults, String sortBy, boolean isAsc);

    public List<Product> findActive(int firstResult,
            int maxResults,
            String sortBy,
            boolean isAsc,
            String productName);

    public List<Product> findActive(int firstResult,
            int maxResults,
            String sortBy,
            boolean isAsc,
            Category id_category);

    public List<Product> findActive(int firstResult,
            int maxResults,
            String sortBy,
            boolean isAsc,
            String productName,
            Category id_category);

    public long countActive();

    public long countActiveByName(String name);

    public long countActiveByCategory(Category id_category);

    public long countActiveByNameCategory(String name, Category id_category);
    
    public List<Product> findAll(int firstResult, int maxResults, String sortBy, boolean isAsc);

    public List<Product> findAll(int firstResult,
            int maxResults,
            String sortBy,
            boolean isAsc,
            String productName);

    public List<Product> findAll(int firstResult,
            int maxResults,
            String sortBy,
            boolean isAsc,
            Category id_category);

    public List<Product> findAll(int firstResult,
            int maxResults,
            String sortBy,
            boolean isAsc,
            String productName,
            Category id_category);

    public long countAll();

    public long countAllByName(String name);

    public long countAllByCategory(Category id_category);

    public long countAllByNameCategory(String name, Category id_category);
    
    
    
    
    
    
    
    
    
    
    
}
